package java7;

import java.util.Scanner;

public class Code097 {
	public static void main(String[] args) {
		int i =0;
		String userName;
		String password;
		Scanner input = new Scanner(System.in);
		for(i=0;i<=3;i++){
			System.out.println("请输入用户名:");
			userName=input.next();
			System.out.println("请输入密码:");
			password=input.next();
			if("cm".equals(userName)&&"123456".equals(password)){
				System.out.println("欢迎登陆MyShopping系统！");
				break;
			}else{
				if(i<3){
					System.out.println("输入错误！您还有"+(3-i)+"次机会！\n");
					continue;
				}		
			}		
		}
		if(i==4){
			System.out.println("对不起，再次输入三次错误，账户已被锁死！");
		}
	}
}
